package state.example;

/**
 * 下午工作状态
 * @author Chen Guang
 * @date 2019/4/16 0016 上午 10:36
 */
public class AfternoonStateImpl implements State{
    @Override
    public void writeProgram(Work work) {
        if(work.getHour() < 17){
            System.out.println("当前时间："+ work.getHour() +",下午状态还不错，继续加油。");
        }else {
            work.setCurrent(new EveningStateImpl());
            work.writeProgram();
        }
    }
}
